#version 400 core

#define POSITION	0
#define MODEL 1
#define COLOR 5

uniform mat4 view;
uniform mat4 proj;

layout(location = POSITION) in vec4 pos;
layout(location = MODEL) in mat4 model;
layout(location = COLOR) in vec4 color;

out vec4 fColor;

void main()
{
	mat4 mvp = proj * view * model;
	vec4 posMVP = mvp * vec4(pos.xyz, 1.0);
	gl_Position = posMVP;
	fColor = color;
}